package com.example.problem2.service;

import com.example.problem2.api.IDemoService;
import com.example.problem2.bean.DemoBean;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

@Component
public class DemoServiceImpl implements IDemoService {

    @Override
    public List<DemoBean> queryDemoAll() {
        List<DemoBean> demoBeanList = new ArrayList<>();
        for (int i=0;i<10;i++) {
            DemoBean demoBean = new DemoBean();
            demoBean.setId("id-"+i);
            demoBean.setValue("value-"+i);
            demoBeanList.add(demoBean);
        }
        return demoBeanList;
    }
}
